1. Field of the Invention
The present invention relates to systems and methods of accepting data entry into a computer, and in particular to the use of intelligent components and text areas for diagnosing and correcting data entry errors.
2. Description of the Related Art
Graphical user interfaces (GUIs) provide an easy to use, intuitive computer interface. A GUI typically includes a number of components such as input fields or areas that allow the user to enter data for computer program parameters or variables. GUI input fields or areas can also be used to accept user input defining parameter or variable names and characteristics.
In many cases, the parameters or variables (and hence, the data entered into the input fields) are subject to value and/or format constraints. Users must adhere to these constraints when entering data into the fields, or errors will result. For example, DOS filenames cannot exceed eight characters, optionally followed by a period and an extension that cannot exceed three characters, and cannot include characters such as backslashes. Database object names, such as names for tables and stored procedure parameter names, have similar restrictions.
Multiple related input fields, each for different parameters or variables, may be grouped together and presented to the user in a dialog box or window. After data has been entered into the required input fields, the user may select an xe2x80x9cOKxe2x80x9d button, and the data in each field is accepted and stored accordingly.
A GUI can respond in many ways when the user violates an input field constraint. One way to respond is to wait until the user tries to commit all changes, then beep and present a dialog box informing the user of the error and information to educate the user as to the proper input form. One drawback of this technique is that it is often difficult for the user to associate the information in the dialog box with the constraint violation. For example, if the user entered data into multiple fields, the user will not know which input field is incorrect. The user must click OK on the error message dialog, associate the error message with the input field in error, select the text in the field in error, and then make the correction. This behavior maximizes the effort needed to commit a change that doesn""t violate any constraint.
Another way the GUI can respond to an erroneous input is to fix the errors without asking for user intervention. For example, if a comment field cannot contain a specific set of impermissible characters, those characters could be automatically stripped out before the comment is committed. This technique has disadvantages as well. First, the user may want the impermissible characters, not realize they have disappeared, and write new code that depends on their entry. This technique also does nothing to educate the user, and even worse, misleads the user into thinking no constraint has been violated.
Another way the GUI can attempt to solve the foregoing problems by avoiding the use of input fields altogether. For example, a length parameter can be specified with a slider bar or a combo box with all possible values in it. This technique is feasible for some parameters (e.g. specifying decimal precision, which generally ranges only between 0 and 31), and infeasible for others (i.e. specifying a BLOB length, which ranges from 1 to 2 gigabytes). Such controls avoid problems with lower and upper limits, and can also reflect context changes. However, such controls are not as flexible as editable text fields. For example, only an editable text field is suitable in cases where the same control (for consistency reasons) must serve as the length of (alternatively) a BLOB and a DECIMAL precision. Further, the name of a new object cannot ordinarily be specified with any other type of control other than an editable text field.
As is apparent from the foregoing, there is a need for a computer interface that validates user-entered data and provides the user with timely, diagnostic information on a field by field basis. The present invention satisfies that need.
To address the requirements described above, the present invention discloses a method, apparatus, article of manufacture for accepting data input into a computer.
The method comprises the steps of presenting a component to the user, wherein the component includes an input area for accepting the input data, and the component is subject to a value constraint for the data, accepting user input into the component input area, and following one or more assistance policies associated with the component when the user input violates the value constraint. The assistance policies govern notification of constraint violations, how and whether user values are corrected, and how values should be changed in relation to other components.
In one embodiment, the value constraint for the input data is organized according to the component content type. In another embodiment, the method comprises the steps of defining a component comprising an input area for accepting input data, associating the component with a value constraint according to a content type of the input area, and associating the component with an assistance policy selected from a set of assistance policies. The article of manufacture comprises a program storage device tangibly embodying instructions for performing the method steps defined above.
The apparatus comprises a means for presenting a component including an input area for accepting user input from the user, wherein the component is subject to a value constraint for the input data according to the type of its content, means for accepting user input into the component input area, and means for enforcing one or more assistance policies associated with the component when the user input violates the value constraint.